package com.example.lj.uav.view;

import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.example.lj.uav.R;
import com.example.lj.uav.utils.VersionUtils;
import com.example.lj.uav.view.base.BaseActivity;

public class AboutActivity extends BaseActivity implements View.OnClickListener {


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_about);
        ((TextView) findViewById(R.id.about_tv_title)).setText("关于" + getResources().getString(R.string.app_name));
        ((TextView) findViewById(R.id.about_tv_version)).setText(VersionUtils.getAppVersionName(this));
        findViewById(R.id.about_fl_back).setOnClickListener(this);
        findViewById(R.id.about_ll_update).setOnClickListener(this);
        findViewById(R.id.about_ll_record).setOnClickListener(this);
        findViewById(R.id.about_tv_useragreement).setOnClickListener(this);
        findViewById(R.id.about_tv_privacypolicy).setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.about_fl_back:
                finish();
                break;
            case R.id.about_ll_update:
                showToast("更新功能暂未开放，敬请期待");
                break;
            case R.id.about_ll_record:
                showToast("更新功能暂未开放，敬请期待");
                break;
            case R.id.about_tv_useragreement:
                toAct(ContentActivity.class, "用户协议");
                break;
            case R.id.about_tv_privacypolicy:
                toAct(ContentActivity.class, "隐私条款");
                break;
        }
    }
}
